<template>
	<div class="view" :style="{'width': data.wh + 'px', 'height': data.wh + 'px'}">
		<p 
			class="headIcon"
			v-text="data.letter" 
			:class="{'radius': data.radius}"
			:style="{'line-height': data.wh + 'px', 'font-size': data.fontsize + 'px'}">
		</p>
		<p 
			class="headIcon2"
			:class="{'radius': data.radius}"
			v-bind:style="{'background-image':'url(' + data.icon + ')', 'line-height': data.wh + 'px', 'font-size': data.fontsize + 'px'}">
		</p>
	</div>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		props: ['data']
	}
</script>

<style scoped>
	.view {
		position: relative;
		cursor: move;
		width: 80px;
		height: 80px;
	}
	
	.radius {
		border-radius: 15%;
		-webkit-border-radius: 15%;
		-moz-border-radius: 15%;
	}
	
	.headIcon {
		background-size: 100% 100%;
		background-color: #666;
		font-size: 30px;
		color: #FFF;
		text-align: center;
		width: 100%;
		height: 100%;
		
	}
	
	.headIcon2 {
		position: absolute;
		top: 0px;
		left: 0px;
		background-size: 100% 100%;
		font-size: 30px;
		color: #FFF;
		text-align: center;
		width: 100%;
		height: 100%;
	}
</style>